package nit.wave.testmain;

import java.util.HashMap;
import java.util.Map;

import nit.wave.service.BiaobaiService;
import nit.wave.service.LibraryService;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			LibraryService libraryService = new LibraryService();
			//System.out.println(DataBaseDAO.findUserByOpenId("lib_user", "owb7kjqpbicpEGKUhTi1R2xq2Vf4"));
			long pre= System.currentTimeMillis();
			System.out.println(libraryService.binding("owb7kjnWUyUzI3y01xvd4h3b_dIw", "3110402159", "199302"));
			long post= System.currentTimeMillis();
			
			System.out.println(pre-post);
			//String result  = libraryService.getBook("owb7kjnyslKbV6sdC-P5ewgsOv1U");
		
			
			//System.out.println(libraryService.changePassword("owb7kjnWUyUzI3y01xvd4h3b_dIw", "199302"));
			//System.out.println(libraryService.getPassword("owb7kjnWUyUzI3y01xvd4h3b_dIw"));
			//System.out.println(libraryService.renewBook("owb7kjnWUyUzI3y01xvd4h3b_dIw", "00665916", "6273E118"));
			
			//JwxtService jwxtService = new JwxtService();
			//System.out.println(jwxtService.binding("owb7kjgIE8IU6bivVwbJl5gq0meM","3120402033", "520,bbmm"));
			//System.out.println(jwxtService.changePassword("owb7kjgIE8IU6bivVwbJl5gq0meM", "520bbmm123df"));
			
			BiaobaiService biaobaiService =new BiaobaiService();
			//Biaobai biaobai = new Biaobai(0, "hah", "xxxx",new  Date().toString(), 1, 0, "xxxxxxxxxxx");
			//System.out.println(biaobaiService.addBiaobai(biaobai));
			Map<String , String> param  = new HashMap<>();
			param.put("type", "article");
			param.put("first", "0");
			//System.out.println(HttpRequest.sendPost("http://1.nbut.sinaapp.com/shudong/json_w.php", param));
			String content = "lib-3110402159-199302";
			String userId = content.substring(4, 14);
			String password = content.substring(15);
			System.out.println(userId);
			System.out.println(password);
			
			String a = "renew-00729226-4D8B21B9";
		System.out.println(a.substring(6,14));
		System.out.println(a.substring(15));
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}



